<template>

    <div id="app">
      <!-- <headers   ref="header"></headers> -->
      <transition name="fade" mode="in-out">
        <router-view ></router-view>
      </transition>
      <div class="tongguan" @click="jump()" >
        通关码<br/>
        申请
      </div>
      <footers></footers>
    </div>

</template>
<script>
import headers from "@/components/header"
import footers from "@/components/footers"
import {
    user_system
  } from '@/utils/wqzApi'
export default {
    components:{
      footers,
      headers,
    },
    data () {
        return {
        }
    },
    mounted() {
      this.getInfo()
    },
    methods:{
      jump(){
        window.open('https://unipass.customs.go.kr/csp/persIndex.do')
      },
      getInfo(){
        var lang =  localStorage.getItem("lang");
        var data = {
          lang:lang=='zh-CN'?1:2
        }
        user_system(data).then(res=>{
          var info = JSON.stringify(res.data)
          var titleElement = document.querySelector("title");
          var webInfo = {}
          if(lang=='zh-CN'){
            webInfo = res.data[1]
            titleElement.innerHTML = webInfo.name;
          }else{
            webInfo = res.data[0]
            titleElement.innerHTML = webInfo.name;
          }

        })
      }
    }
}
</script>

<style lang="scss">
  .tongguan{
    position: fixed;
    top: 76vh;
    right: 2vw;
    width: 4vw;
    height:4vw;
    border-radius: 4vw;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: .7vw;
    font-weight: 800;
    // box-shadow:  0 0 5px 5px #409eff;
    background-color: #409eff;
    color: #fff;
    transition:right .5s;
    -webkit-transition:right .5s; /* Safari */
    cursor: pointer;
    user-select: none;
    z-index: 10000;
  }
  // .tongguan:hover{
  //     right: .5vw;
  // }
  .fade-enter {
    opacity:0;
  }
  .fade-leave{
    opacity:1;
  }
  .fade-enter-active{
    transition:opacity .2s;
  }
  .fade-leave-active{
    opacity:0;
    transition:opacity .2s;
  }
  @import url("element-ui/lib/theme-chalk/display.css");
 html,
  body, #app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
}
 html,
  body,
  ul,
  li,
  ol,
  dl,
  dd,
  dt,
  p,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  form,
  fieldset,
  legend,
  img {
    margin: 0;
    padding: 0;
  }

  fieldset,
  img,
  input,
  button,
  textarea {
    border: none;
    padding: 0;
    margin: 0;
    outline-style: none;
  }

  ul,
  ol {
    list-style: none;
  }

  input {
    padding-top: 0;
    padding-bottom: 0;
    //font-family: "SimSun", "宋体";
  }

  select,
  input {
    vertical-align: middle;
  }

  select,
  input,
  textarea {
    font-size: 12px;
    margin: 0;
  }

  textarea {
    resize: none;
  }

  /*防止拖动*/

  img {
    border: 0;
    vertical-align: middle;
    max-width: 100%;
  }

  /*  去掉图片低测默认的3像素空白缝隙*/
  table {
    border-collapse: collapse;
  }



  /* 弹性盒子 */
  .uni-flex {
  	display: flex;
  }
  .uni-row {
  	flex-direction: row;
  }
  .uni-column {
  	flex-direction: column;
  }
  .uni-warp {
  	flex-wrap: wrap;
  }
  .uni-flex-item {
  	flex: 1;
  }
  .uni-flex-start {
  	justify-content: flex-start;
  }
  .uni-flex-end {
  	justify-content: flex-end;
  }
  .uni-flex-center {
  	justify-content: center;
  }
  .uni-flex-between {
  	justify-content: space-between;
  }
  .uni-flex-around {
  	justify-content: space-around;
  }
  .uni-align-start {
  	align-items: flex-start;
  }
  .uni-align-center {
  	align-items: center;
  }
  .uni-align-end {
  	align-items: flex-end;
  }


  .uni-br-rd-ccc{
  	border: 1px solid #CCCCCC;
  	border-radius: 10rpx;
  }

  /* 文本溢出隐藏 单行*/
  .uni-ellipsis {
  	overflow: hidden;
  	white-space: nowrap;
  	text-overflow: ellipsis;
  	-o-text-overflow: ellipsis;
  }
  /* 文本溢出隐藏 多行*/
  .uni-ellipsis-2 {
  	text-overflow: -o-ellipsis-lastline;
  	overflow: hidden;
  	text-overflow: ellipsis;
  	display: -webkit-box;
  	-webkit-line-clamp: 2;
  	line-clamp: 2;
  	-webkit-box-orient: vertical;

  }

  /* 文本溢出隐藏 多行*/
  .uni-ellipsis-3 {
  	text-overflow: -o-ellipsis-lastline;
  	overflow: hidden;
  	text-overflow: ellipsis;
  	display: -webkit-box;
  	-webkit-line-clamp: 3;
  	line-clamp: 3;
  	-webkit-box-orient: vertical;
  }

</style>
